home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PROHP.ARJ
/
DSHADOWT.PRG
< prev
next >
Wrap
Text File
|
1992-06-23
|
2KB
|
49 lines
/*
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ Program : shadowt.prg │
│ │
│ Purpose : Create 9 boxes showing the different shadow types. │
│ You can also see how to center an array of text │
│ inside a box using code block. │
│ │
│ Author : Copyright (C) 1992, I.L.A.,Inc. All Rights reserved. │
│ │
│ Comments: This source code may be distributed and used freely │
│ provided that the copyright notice is not removed. │
│ │
└─────────────────────────────────────────────────────────────────────────┘
*/
#include "prohp.ch"
proc main()
Local nTop:=5,nLeft:=1, nHeight := 1, nWidth:=1, nSp:=0.5,b
Local nOrigT:=nTop, nOrigL:=nLeft
Local bSt := {|i| HP_aatsay(nTop+1/HP_data(D_LPI)+(nHeight-HProw2i(3))/2,;
nLeft+nWidth/2,{"Shadow","Type","#"+str(i,2)},,"C")}
HP_init()
set2print("dshadowt.hpc")
HP_pitch(16) // select font
HP_lpi(8) // LPI
b:=1
HPshadow(.t.) // make shadow boxes
HPsetshadow(,GFILLBLACK) // make shadow black
while b <= 9
HPsetshadow(,,,b) // change shadow type
HP_box(nTop,nLeft,nHeight,nWidth) // draw box
eval(bSt,b) // evaluate block to print array of text inside box
b++
if b%3=1 // up a row
nTop-=nHeight+nSp
nLeft:=nOrigL
else
nLeft+=nWidth+nSp // move to the right
endif
enddo
HP_reset()
set2screen()
return